Traditionally, in a goods distribution system, a system is conventionally available wherein a barcode symbol is affixed to or printed on a distribution goods and reading such kind of the barcode symbol by a barcode reader (hereinafter refer to as “an optical information reading device”) or the like for processing the information. The optical information reading device reads a barcode symbol 1 to search for its start margin and processes to decode characters following the start margin so as to output barcode data.
By the way, a barcode symbol standard includes CODE 128, CODE 39, EAN/UPC (EAN/Universal Product Code), Interleaved 2 of 5, Coder Bar, RSS, RSS Limited, RSS Expanded and the like. Meanwhile, there are many cases in the barcode symbol that the barcode symbol mark is affixed to or printed directly to the distribution goods. However, it is assumed that the barcode symbol affixed to or printed on the distribution goods is not read correctly due to a printing technology, variability of the pasting technology or a handling method of the distribution goods. Causes of not correctly reading the barcode symbol are a lack, a scratch, etc. of bar or space that forms the barcode symbol.
Regarding such optical information reading device, Patent Document 1 discloses a barcode symbol reading device, a start margin candidate detecting method thereof and a barcode symbol reading method. A decode process for obfuscated characters, including such a lack, a scratch or the like occurred unwillingly in bars and spaces forming the barcode symbol, will be explained with reference to FIG. 14 through FIG. 17.
FIG. 14 is a block diagram that shows a configuration example of a conventional optical information reading device 20. The optical information reading device 20 shown in FIG. 14 contains an optical reading unit 2, a clock generation unit 3, m-stage data buffer 5, an x-multiplier 7, a selector unit 6, a comparator 8, a start margin storage unit 9, an interface unit 11, a decode buffer 25, a count data value storage unit 30, a CPU 33 and a counter unit 40 for a barcode data value.
The optical reading unit 2 reads a barcode symbol 1 as a reading target and generates code readout data D2. For example, the optical reading unit 2 emits a light from an optical source, such as a light emitting diode (LED), a laser diode (LD) or the like to the barcode symbol 1, receives its reflected light by a light receiving device, such as a photo diode, a photo transistor or the like to convert it into an electrical signal, performs binarization on the electrical signal and converts it into digital code readout data D2 that indicates a shading of the barcode symbol 1, namely, a bar of a black portion and a space of a white portion.
The optical reading unit 2 is connected to the counter unit 40. The clock generation unit 3 is connected to the counter unit 40. The clock generation unit 3 generates a sampling clock signal (hereinafter, merely referred to as “CLK signal”) having a predetermined frequency and applies the CLK signal to the counter unit 40. The clock generation unit 3 uses an oscillator.
The counter unit 40 for the barcode data value receives the code readout data D2 from the optical reading unit 2 and the CLK signal from the clock generation unit 3, counts the code readout data D2 on the basis of the CLK signal and converts the code readout data D2 into count data D4 (barcode data value: numerical value) representative of widths of elements containing the space as the white portion and the bar as the black portion.
The counter unit 40 is connected to the m-stage data buffer 5, the x-multiplier 7 and the counted data value storage unit 30. The m-stage data buffer 5 temporarily stores the m-stage volume (m is an arbitrary integer) of the count data D4 from the counter unit 40. The m-stage is optionally set in accordance with a print condition of the barcode symbol 1. The m-stage data buffer 5 is configured by a storage circuit such as a flip-flop circuit, a memory or the like.
Since “x” representative of a scale factor with respect to the count data D4 is predetermined when searching the count data D4 for the start margin, the x-multiplier 7 computes the x-multiplication to output the x-multiplication data D7. The x-multiplier 7 is configured by an arithmetic circuit for multiplying the count data D4 by x. The CPU 33 sets the multiplication of the count data D4 in the x-multiplier 7 in accordance with the print condition of the barcode symbol 1.
The m-stage buffer 5 is connected to the selector unit 6. The selector unit 6 selects the data of the comparison target from the count data D4 of the m stages stored temporarily in the m-stage data buffer 5. The selector unit 6 is under control of the CPU 33 or the like so as to select the count data D4 to be compared from the m-stage count data D4.
The CPU 33 sets the selector unit 6 so as to select a stage (k-stage) of the m-stage data buffer 5, wherein the count data D4 prior to that stage is the comparison target, in accordance with a print condition, a print work-up, a smear based on external factors, etc. In this example, a smart margin candidate is previously set in accordance with a fact how many times the count data D4 from the m-stage buffer 5 is larger than the a value of the count data D4 from the counter unit 40.
The comparator 8 is connected to the selector unit 6 and the x-multiplier 7. The selector 8 compares each count data D4 prior to the k-th stage in the m-stage data buffer 5 with the x-multiplied data D7 from the x-multiplier 7. As a result, when the x-multiplied data D7 from the x-multiplier 7 is smaller, it is determined that the start margin candidate exists and a start margin candidate search flag (hereinafter, referred to as “SMF data D8”) is generated. The SMF data D8 is applied to the start margin storage unit 9.
The comparator 8 is connected to the start margin storage unit 9. The start margin storage unit 9 is configured to have a storage function, such as a flip-flop circuit. The start margin storage unit 9 stores correspondingly the SMF data D8 from the comparator 8 and the counted data value=the barcode data value D30 as the comparison target at that time. This is because it can be understood which count data D4 is the start margin candidate. The start margin candidate is generated when a white bar having width of a certain degree or more exists prior to a bar of the barcode symbol 1.
The counted data value storage unit 30 stores in chronological order all the count data D4 sequentially output from the counter unit 40. The counted data value storage unit 30 is configured by a storage circuit such as a flip-flop circuit, a DRAM or the like. An interface unit 11 is connected to the start margin storage unit 9 and the counted data value storage unit 30.
The interface unit 11 supplies the SMF data D9 read out from the start margin storage unit 9 and the barcode data value D30 of each character read out from the counted data value storage unit 30 to the CPU 33. The decode buffer 25 is connected to the interface unit 11 and stores the barcode data D12 from the CPU 33.
The decode buffer 25 stores the interim computation data of barcode data value D30 of each character from the counted data value storage unit 30, too. An output terminal OUT is connected to the interface unit 11 and the barcode data D12 after the decode process is applied to the output terminal OUT. For example, the barcode data D12 is read out from the decode buffer 25 through the interface unit 11 to the output terminal OUT.
FIG. 15 shows a computation example according to conventional 2-element added data. The CLK signal shown in FIG. 15 is applied to the counter unit 40 from the clock generation unit 3 shown in FIG. 14. The barcode symbol 1 shown in FIG. 15 is based on, for example, CODE 128 Standard. According to the CODE 128 Standard, one character shown in FIG. 15 consists of three black portion bars (1), (3) and (5) and three white portion spaces (2), (4) and (6). The total width of one character comprises eleven modules. In this character C1, the black portion bar (1) consists of four modules, and the bars (3) and (5) consist of one module respectively. The white portion space (2) consists of one module and the spaces (4) and (6) consist of two modules respectively.
The barcode data value D30 shown in FIG. 15 is derived by sampling the code readout data D2 from the optical reading unit 2 shown in FIG. 14 on the basis of the CLK signal from the clock generation unit 3, counting the code readout data D2 on the basis of the CLK signal and converting the code readout data D2 into the count data D4 that represents the widths of the elements containing the white portion space and the black portion bar.
W11 shown in FIG. 15 is the width of the black portion bar (1) of the character C1. W12 is the width of the space (2) following the bar (1). W13 is the width of the bar (3) following the space (2) of the character C1. W14 is the width of the space (4) following the bar (3) of the character C1. W15 is the width of the bar (5) following the space (4). W16 is the width of the space (6) following the bar (5) of the character C1. The data representative of the widths of the above described six kinds forms the barcode data value D30 of one character.
W21 shown in FIG. 15 is the width in which the bar (1) and the space (2) of the character C1 added by the CPU 33 (hereinafter referred to as “the bar (1)+the space (2)”). The counted data value representative of the added width of the bar (1)+space (2) constitutes the width W21 data. W22 is the width in which the space (2) and the bar (3) following the bar (1) of the character C1 are added by the CPU 33. The counted data value representative of the added width of the space (2)+the bar (3) forms the width W22 data.
W23 is the width in which the bar (3) and the space (4) following the space (2) of the character C1 are added by the CPU 33. The counted data value indicating the added width of the bar (3)+the space (4) constitutes the width W23 data. W24 is the width in which the space (4) and the bar (5) following the bar (3) of the character C are added by the CPU 33. The counted data value indicating the added width of the space (4)+the bar (5) constitutes the width W24 data. W25 is the width in which the bar (5) and the space (6) following the space (4) of the character C1 are added by the CPU 33. The counted data value indicating the added width of the bar (5)+the space (6) constitutes the width W25 data. The above described five kinds of the width W21 data through the width W25 data are 2-element added type data and they form the barcode data value D30.
FIG. 16 and FIG. 17 are flow charts indicating decode examples (first and second) of the obfuscated character according to the conventional example. The following explanation is under such a condition that the optical information reading device 20 reads the barcode symbol 1 based on the CODE 128 Standard to search for its start margin and further processes the decode of the character following the start margin with the 2-element adding method to output the barcode data D12. In this case, a tolerance (maximum error range) of each element of the bar and the space in the barcode symbol 1 is set to, for example, .+−.0.5 module.
Under these recoding condition, the CPU 33 searches for the start margin in a step ST81 of the flow chart shown in FIG. 16. At this moment, the optical reading unit 2 reads the barcode symbol 1 to generate the code readout data D2. The code readout data D2 is applied from the optical reading unit 2 to the counter unit 40. The clock generation unit 3 applies the sampling CLK signal of a predetermined frequency to the counter unit 40.
The counter unit 40 receives the code readout data D2 from the optical reading unit 2 and the CLK signal from the clock generation unit 3 and counts the code readout data D2 on the basis of the CLK signal. The code readout data D2 is converted into the count data D4 that indicates the 2-element added width of the elements containing the white portion space and the black portion bar. The count data D4 is a numerical value data train that indicates the width of each bar (black portion) and the width of the space (white portion) in the barcode symbol 1. The count data D4 is stored in the counted data value storage unit 30.
The m-stage data buffer 5 stores temporarily the m-stage volume (m is an arbitrary integer) of the count data D4 from the counter unit 40. The m-stage is optionally set in accordance with the print condition of the barcode symbol 1. When searching for the start margin from the count data D4, “x” indicating a multiplying factor for the count data D4 is previously set and the x-multiplier 7 performs the x-multiplying calculation to output the x-multiplied data D7.
The selector unit 6 receives the selection control of the CPU 33 and selects the comparison target data from the m-stage amount of the count data D4 temporarily stored in the m-stage data buffer 5. The comparator 8 compares each of the items of the count data D4 prior to the k-th stage of the m-stage data buffer 5 with the x-multiplied data D7 from the x-multiplier 7.
When the comparison result shows that the x-multiplied data D7 from the x-multiplier 7 is smaller, it is determined that the start margin candidate exists and the start margin candidate search flag (hereinafter referred to as “SMF data D8”) is generated. The SMF data D8 is applied to the start margin storage unit 9. The start margin storage unit 9 stores correspondingly the SMF data D8 from the comparator 8 and the counted data value=D10 as the comparison target at that time.
In a step ST82, the CPU 33 extracts the width data of one character (6 elements). According to the character C1 shown in FIG. 15, the counter unit 40 counts the width W11 of the black portion bar (1) and its counted data value becomes the width W11 data. The counter unit 40 counts the width W12 of the white portion space (2) following the bar (1) too and its counted data value becomes the width W12 data. The counter unit 40 counts the width W13 of the bar (3) following the space (2) and its counted data value becomes the width W13 data.
The counter unit 40 counts the width W14 of the space (4) following the bar (3) too and the counted data value becomes the width W14 data. The counter unit 40 counts the width W15 of the bar (5) following the space (4) and the counted data value becomes the width W15 data. The counter unit 40 counts the width W16 of the space (6) following the bar (5) too and the counted data value becomes the width W16 data. The above described six kinds of the width W11 data through the width W16 data constitute the barcode data value D30. The barcode data value D30 is applied through the interface unit 11 to the CPU 33.
The CPU 33 computes one module width of the character C1 in a step ST83. In this example, the CPU 33 converts the barcode data value D30 of the width W11 data through the width W16 data for six elements of one character into the module number of the character to obtain the module number of the 2-element added pattern. As shown in FIG. 15, the five kinds of the width W21 data through the width W25 data are sequentially output to the CPU 33 from the counted data value of the counter unit 40.
For example, the CPU 33 receives the width W21 data and obtains the module number of the added width W21 for the sum of the bar (1) and the space (2) of the character C1. The module number is a ratio of the added width W21 to the whole character width=11 modules, and, for example, 2.4 is computed. In this case, the module number of the added width W21 is modified to the nearest integer by rounding off the module number so that the maximum error of each element, such as the bar and the space is within 0.5. For example, when the module number of the W21 is 2.4, the module number of the W21 is modified to “2”. When the module number is 2.6, the module number of the W21 is modified to “3”.
In a step ST84, the CPU 33 converts the barcode data value D30 of one character into the 2-element added pattern. For example, the CPU 33 adds the bar (1) and the space (2) of the character C1 shown in FIG. 15 to obtain the counted data value indicating the added width W21 and this counted data value becomes the width 21 data. The CPU 33 adds the space (2) and the bar (3) following the bar (1) of the character C1 to obtain the counted data value indicating the added width W22 and this counted data value becomes the width W22 data.
The CPU 33 adds the bar (3) and the space (4) following the space (2) of the character C1 to obtain the counted data value indicating the added width W23 and this counted data value becomes the width W23 data. The CPU 33 adds the space (4) and the bar (5) following the bar (3) of the character C1 to obtain the counted data value indicating the added width W24 and this counted data value becomes the width W24 data. The CPU 33 adds the bar (5) and the space (6) following the space (4) of the character C1 to obtain the counted data value indicating the added width W25 and this counted data value becomes the width W25 data.
After that, in a step ST85, the CPU 33 searches for a character that is coincident with the previously converted 2-element added pattern. In this example, the CPU 33 searches for a character wherein the previously converted module value matches a theoretical value of an expected value character in the five kinds of the width W21 data through the width W25 data (2-element added data) in accordance with the barcode data value D30 from the counter unit 40 shown in FIG. 14. In the conventional method, the character is determined at this stage.
In a step ST86, the CPU 33 branches the control process in accordance with a fact if the matched character exists or not. If the matched character exists, the character matched to the 2-element added pattern is a decoded result in a step ST87. Thereafter, the process proceeds to a step ST88 shown in FIG. 17.
With regard to the character assigned to the decoded result in the step ST87, the CPU 33 branches the control process in accordance with a fact if the character is just after the margin or not in the step ST88. If the character regarded as the decoded result is not the character just after the margin, the process proceeds to a step ST89 wherein the CPU 33 branches the control process in accordance with a fact if the decoded result is a stop character or not.
If the decoded result is not the stop character, the process proceeds to a step ST90 wherein the CPU 33 performs an error detection (parity check) and branches the control process in accordance with a fact if the check digit is correct or not. When the check digit is correct, the CPU 33 completes the readout operation in a step ST91 wherein the barcode data D21 of the decode buffer 25 is outputted and the decode buffer 25 is cleared (normal finish). Thereafter, the process proceeds to a step ST95.
In addition, if the character is just after the margin in the step ST88, the process proceeds to a step ST92 wherein the CPU 33 branches the control process in accordance with a fact if the decoded result is the start character or not. If the decoded result is the stop character in the above described step 89 or the decoded result is the start character in the step ST92, the process proceeds to the step 83 shown in FIG. 16. In the step ST83, the CPU 33 performs the decode process of the next character (barcode data value D30 posterior by six elements). Then, the process returns to the step ST81.
If the coincident character does not exist in the step ST86 shown in FIG. 16, the decoded result is not the start character in the step ST92 shown in FIG. 17 or the check digit is wrong in the step ST90, the process proceeds to a step ST94 wherein the CPU 33 performs the reading error process.
After that, the process proceeds to the step ST95 wherein the CPU 33 determines if the process finishes or not. For example, if a reading end command to the optical information reading device 20 is detected and the reading end command is detected, the reading control for the barcode symbol 1 ends. If the reading end command is not detected, the process returns to the step ST81 and the above described operation will be repeated in order to continue the reading control of the barcode symbol 1.